{% extends 'myadmin/base/content_base.html' %}
{% load static %}



{% block title %}
  测试删除
{% endblock %}

{% block content_header %}
  测试删除
{% endblock %}

{% block header_option_desc %}
  测试删除
{% endblock %}


{% block content %}
  <div class="row">
    <div class="col-md-12 col-xs-12 col-sm-12">
      <div class="box box-primary">
{#        <div class="box-header">#}
{#          <button class="btn btn-primary pull-right" id="btn-add-tag">添加课程</button>#}
{#        </div>#}

        <div class="box-body">
        <div style="margin-bottom: 10px">
                <form class="form-inline user-query">
{#                    <div class="form-group">#}
{#                        <label for="">用户名</label>#}
{#                        <input type="text" class="form-control" name="username" value="{{ username }}">#}
{#                    </div>#}
{##}
{#                    <div class="form-group">#}
{#                        <label for="">分组</label>#}
{#                        <select name="group" id="" class="form-control">#}
{#                            <option value="">所有</option>#}
{#                            {% for group in groups %}#}
{##}
{#                                <option {% if groups__id == group.id %}selected{% endif %}#}
{#                                        value="{{ group.id }}">{{ group.name }}</option>#}
{##}
{#                            {% endfor %}#}
{#                        </select>#}
{#                    </div>#}
{#                    <div class="form-group">#}
{#                        <label for="">是否员工</label>#}
{#                        <select name="is_staff" id="" class="form-control">#}
{#                            <option value="">所有</option>#}
{##}
{#                            <option {% if is_staff is True %}selected{% endif %} value="1">是</option>#}
{#                            <option {% if is_staff is False %}selected{% endif %} value="0">否</option>#}
{#                        </select>#}
{#                    </div>#}
                    <div class="form-group">
                        <label for="">是否审核通过</label>
                        <select name="is_pass" id="" class="form-control">
                            <option value="">所有</option>
                            <option {% if is_superuser is True %}selected{% endif %} value="1">是</option>
                            <option {% if is_superuser is False %}selected{% endif %} value="0">否</option>
                        </select>
                    </div>
                    <button type="button" class="btn btn-info query">查询</button>
{#                    <button type="button" class="btn btn-default reset">重置</button>#}
                </form>
            </div>
        <p style="color: red">点击封面图片后点击播放器播放</p>
      <div id="apDiv1" style="width: 200px;height: 200px;background-image:url({% static  '背景5.png'%}) ">
                          <div class="course-video" id="course-video">
                              <div id="playercontainer"></div>
                              <span class="course-data" data-video-url="{{one_course.video_url }}"></span>
                          </div>
                      </div>
          <table class="table table-bordered table-hover">
            <thead>
            <tr>
                <th>#</th>

              <th>ppt片段名</th>
{#                <th>顺序</th>#}
              <th>课件名</th>
              <th>课程类别</th>
              <th>课程</th>
              <th>上传时间</th>
{#              <th>操作</th>#}
              <th>简介</th>
              <th>大纲</th>
              <th>时长</th>
              <th>封面</th>
{#              <th>浏览</th>#}
{#              <th>逻辑删除</th>#}
              <th>审核通过</th>
                <th>操作(不能操作已删除对象)</th>
              <th>审核</th>
            </tr>
            </thead>
            <tbody id="tbody" style="width: 900px">
            {% for one_course in course %}
                <td style="width: 40px" data-url="{% url 'myadmin:course_update' one_course.id %}"><a href="#">{{ forloop.counter }}</a></td>

                  <td>{{ one_course.title }}</td>
{#                 <td>{{ one_course.id }}</td>#}
                  <td>{{ one_course.lesson }}</td>
                  <td>{{ one_course.category.parent }}</td>
                  <td>{{ one_course.category.name }}</td>
                  <td>{{ one_course.create_time }}</td>
                  <td>{{ one_course.profile|default:'无' }}</td>
                  <td>{{ one_course.outline|default:'无' }}</td>
                  <td>{{ one_course.duration }}</td>
                  <td class="play" data-video-url="{{ one_course.video_url }}">
                      <a><img src="{{ one_course.cover_url }}" alt="" style="width: 80px;height: 20px"></a>
                  </td>
{#                <td>#}
{##}
{##}
{#                </td>#}
{#                  <td>{% if one_course.is_delete %}是{% else %}否{% endif %}</td>#}
                  <td>{% if one_course.is_pass %}是{% else %}否{% endif %}</td>
                <td>
{#                  <button class="btn btn-xs btn-warning btn-edit">编辑</button>#}
{#                  <a href="#" class="btn btn-xs btn-warning btn-edit">编辑</a>#}
                  <button class="btn btn-xs btn-danger btn-del" data-name="{{ one_course.title}}" data-id="{{ one_course.id}}">删除</button></td>
                <td>
{#                  <button class="pass" data-name="{{ one_course.title}}" data-id="{{ one_course.id}}">通过</button>#}
{#                  <a href="#" class="btn btn-xs btn-warning btn-edit">编辑</a>#}
                  <button class="un_pass " data-name="{{ one_course.title}}" data-id="{{ one_course.id}}">通过</button>
                </td>
              </tr>
            {% endfor %}


            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>


      <div class="modal modal-danger fade" id="modal-delete">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">警告</h4>
                </div>
                <div class="modal-body">
                    <p>One fine body&hellip;</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-outline pull-left" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-outline delete-confirm">确定</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>


    <div class="modal modal-danger fade" id="modal-pass">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">警告</h4>
                </div>
                <div class="modal-body">
                    <p>One fine body&hellip;</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-outline pull-left" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-outline delete-pass">确定</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>


{% endblock %}

{% block script %}
    <script src="{% static 'js/base/sweetalert.min.js' %}"></script>
       <script type="text/javascript" src="https://cdn.bdstatic.com/jwplayer/latest/cyberplayer.js"></script>
{#    <script src="{% static 'js/base/fsweetalert.js' %}"></script>#}
    <script src="{% static 'js/myadmin/course/courses_manage.js' %}"></script>
    <script src="{% static 'js/myadmin/course/courses_manage1.js' %}"></script>




    <script src="{% static 'node_modules/@baiducloud/sdk/dist/baidubce-sdk.bundle.min.js' %}"></script>
{% endblock %}